Flat distributions

ListOfMeasurements[x_,σ_,nP_]:=x+σ*RandomReal[{-1,1},nP]

1 ± 0.2

xs=ListOfMeasurements[1,0.2,100000];
Histogram[xs]

2 ± 0.3

ys=ListOfMeasurements[2,0.3,100000];
Histogram[ys]

ListOfMeasurements[3,0.1,100000]+ListOfMeasurements[1,0.1,100000];
Histogram[%]

Normal distribution

PDF[NormalDistribution[μ,σ],x]

ListOfMeasurementsGauss[μ_,σ_,nP_]:=RandomVariate[NormalDistribution[μ,σ],nP]

xs=ListOfMeasurementsGauss[1,0.2,100000];
Histogram[xs]

ys=ListOfMeasurementsGauss[2,0.3,100000];
Histogram[ys]

ListOfMeasurementsGauss[3,1,100000]+ListOfMeasurementsGauss[1,0.1,100000];
Histogram[%]

ListOfMeasurementsGauss[0,0.3,100000];
Histogram[%]

Sum

a=0;b=0;
σa=3;σb=1.;
la=ListOfMeasurementsGauss[a,σa,100000];
lb=ListOfMeasurementsGauss[b,σb,100000];
lab=ListOfMeasurementsGauss[a+b,(Sqrt[σa^2+σb^2]),100000];
data=la+lb;
StandardDeviation[data]
(Sqrt[σa^2+σb^2])
Show[
Histogram[data,{1},"ProbabilityDensity",ChartStyle->Opacity[0.1,Hue[.5]]],
Histogram[lab,{1},"ProbabilityDensity",ChartStyle->Opacity[0.1,Hue[.25]]],
Plot[PDF[NormalDistribution[a+b,(Sqrt[σa^2+σb^2])],x],{x,-30,30},PlotStyle->Thick,PlotRange->All]]
Unset[{a,b,σa,σb,data,la,lb,lab}];

Product

a=0;c=3;
σa=3;
la=ListOfMeasurementsGauss[a,σa,100000];
data=c*la;
StandardDeviation[data]
c*σa
Show[
Histogram[data,{1},"ProbabilityDensity",ChartStyle->Opacity[0.1,Hue[.5]]],
Histogram[la,{1},"ProbabilityDensity",ChartStyle->Opacity[0.1,Hue[.25]]],
Plot[PDF[NormalDistribution[c*a,c*σa ],x],{x,-30,30},PlotStyle->Thick,PlotRange->All]]
Unset[{a,b,σa,σb,data,la,lb,lab,c}];

{a,v}^r

Power

d y = n x^(n - 1) dx = n y  dx/ x 
dy / y = n dx/x

y=(a^4)

a=4;σa=0.3;n=4;
la=ListOfMeasurementsGauss[a,σa,1000000];
data=la^n;
Print[Row[{Mean[data],"±",StandardDeviation[data]}]]
Print[Row[{a^n,"±",std=n*a^(n-1)*σa}]]
D[x^4,x]*σa/.x->a
std=n*a^(n-1)*σa
D[x^4,x]*σa/.x->a
Show[
Histogram[data,100,"ProbabilityDensity",ChartStyle->Opacity[0.1,Hue[.5]]],
(*Histogram[la,{1},"ProbabilityDensity",ChartStyle->Opacity[0.1,Hue[.25]]],*)
Plot[PDF[NormalDistribution[a^n,std ],x],{x,0,800},PlotStyle->Thick,PlotRange->All]]
Unset[{a,b,σa,σb,(*data,*)la,lb,lab,n,std}];

?HistogramList

(* bin delimiters ! *)

hlist=HistogramList[data,{1},"ProbabilityDensity"];
hcounts=Transpose[{Drop[hlist[[1]],1],hlist[[2]]}];
fit=NonlinearModelFit[hcounts,{const*PDF[NormalDistribution[μ,σ ],x]},{{μ,256},{σ,75},const},x];
Show[{
ListPlot[fit["Data"],PlotStyle->{Dotted,Red},Joined->True,PlotRange->{{0,400},All}],
Plot[fit["Function"][x],{x,0,400},PlotRange->All,PlotStyle->{Green,Dashed}]
},ImageSize->Medium
]
fit["BestFitParameters"]
Unset[{hcounts,hlist}];

Select[data,(Abs[#-256]<20)&]//Length

Histogram[Select[data,(Abs[#-246]<30)&],20,"ProbabilityDensity"]

hlist=HistogramList[Select[data,(Abs[#-238]<40)&],30,"ProbabilityDensity"];
hcounts=Transpose[{Drop[hlist[[1]],1],hlist[[2]]}];
fit=NonlinearModelFit[hcounts,{const*PDF[NormalDistribution[μ,σ ],x]},{{μ,256},{σ,75},const},x];
Show[{
ListPlot[fit["Data"],PlotStyle->{Dotted,Red},Joined->True,PlotRange->{{0,400},{0,Automatic}}],
Plot[fit["Function"][x],{x,0,400},PlotRange->All,PlotStyle->{Green,Dashed}]
},ImageSize->Medium
]
fit["BestFitParameters"]
Unset[{hcounts,hlist}];

Be careful !

a=113;σa=90;n=2;
la=ListOfMeasurementsGauss[a,σa,100000];
data=la^n;
Print[Row[{Mean[data],"±",StandardDeviation[data]}]]
Print[Row[{a^n,"±",std=n*a^(n-1)*σa}]]
Show[
Histogram[data,20,"ProbabilityDensity",ChartStyle->Opacity[0.1,Hue[.5]]],
(*Histogram[la,{1},"ProbabilityDensity",ChartStyle->Opacity[0.1,Hue[.25]]],*)
Plot[PDF[NormalDistribution[a^n,std ],x],{x,-(a-2σa)^n,(a+3σa)^n},PlotStyle->Thick,PlotRange->All]]
Unset[{a,b,σa,σb,(*data,*)la,lb,lab,n,std}];

it is not even a Gaussian, it’s just the square of a gaussian variable.

Higher-order analytic excursion of the function - Prototyping

varied=Normal[Series[x^n,{x,a,1}]]/.x->a+η*σa 
const= Normal[Series[x^n,{x,a,0}]]
Simplify[varied-const]
Unset[{const,varied}];

varied=Normal[Series[x^n,{x,a,2}]]/.x->a+η*σa 
const= Normal[Series[x^n,{x,a,0}]]
Collect[varied-const,σa,Simplify]
Unset[{const,varied}];

variation[f_,x0_,Δx0_,o_]:=Module[{const,varied,a=x0,σa=Δx0},
varied=Normal[Series[f,{x,a,o}]]/.x->a+η*σa ;
const= Normal[Series[f,{x,a,0}]];
Collect[varied-const,σa,Simplify]
]

Higher-order analytic excursion of the function

variation[x^6,4,0.3,2]
%/.η->{1,-1}
Map[Abs,%]//Mean

Beyond the linear order it is an asymmetric excursion, (SubMinus[Δf])  ≠ (SubPlus[Δf]) .

p=4
Table[{k,Mean[Map[Abs,variation[x^p,4,0.3,k]/.η->{1,-1}]]},{k,1,p}]
p//Unset

p=4
Table[{k,Mean[Map[Abs,variation[x^-p,4,0.3,k]/.η->{1,-1}]]},{k,1,2p}]
p//Unset

In general the excursion of the function, even averaging the asymmetric + and - excursion, changes when the order of Taylor expansion is changed.

Functions

The expected value, a.k.a. the mean, as well changes when more orders are kept in the Taylor series.

John A. Rice - Mathematical Statistics and Data Analysis

y=1+x+c*x^2  where c can have both signs, e.g. c=1 and c=-1

dy/dx = 1+2 c x

a=1;σa=0.1;c=3;
la=ListOfMeasurementsGauss[a,σa,100000];
data=1+la+c*la^2;
Print[Row[{Mean[data],"±",StandardDeviation[data]}]]
Print[Row[{1+a+c*a^2,"±",std=Abs[(1+2*c*a)*σa]}]]
Show[
Histogram[data,20,"ProbabilityDensity",ChartStyle->Opacity[0.1,Hue[.5]]],
Plot[PDF[NormalDistribution[1+a+c*a^2,std ],x],{x,-10,10},PlotStyle->Thick,PlotRange->All]]
Unset[{a,b,c,σa,σb,(*data,*)la,lb,lab,n,std}];